<template>
    <view style="padding: 20upx ">
       
        <view>
            <view style="font-size: 30upx;">{{detailsData.title}}</view>
        </view>
        <view class="desc">
            {{ detailsData.add_time }}
            <span>浏览量：{{ detailsData.visit }}</span>
        </view>
        <view class="desc">
            {{ detailsData.synopsis }}
           
        </view>
        <view  v-html="detailsData.content"> </view>


    </view>
</template>

<script>
import mainList from '@/components/mainList/index.vue'
import uTabs from '@/components/uTabs/index.vue'
export default {
    components: {
        mainList,
        uTabs
    },
    data() {
        return {
            array: ['中国', '美国', '巴西', '日本'],
            index: 0,
            tabBasicList: [
                {
                    name: '2024'
                },
                {
                    name: '2023'
                },
                {
                    name: '2022'
                },
                {
                    name: '其他'
                }
            ],
            checkboxValue1: [],
            // 基本案列数据
            checkboxList1: [{
                name: '独角兽',
                disabled: false
            },
            {
                name: '隐形独角兽',
                disabled: false
            },
            {
                name: '其他',
                disabled: false
            }
            ],
            topCompanyBasicList: [
                {
                    id: 0,
                    title: '2024年度全球独角兽企业500强大会',
                    desc: '企业简介企业简介企业简介',
                    tag: '企业标签',
                    slot: ''
                },
                {
                    id: 1,
                    title: '2024年度全球独角兽企业500强大会',
                    desc: '企业简介企业简介企业简介',
                    tag: '企业标签',
                    slot: ''
                },
                {
                    id: 2,
                    title: '2024年度全球独角兽企业500强大会',
                    desc: '企业简介企业简介企业简介',
                    tag: '企业标签',
                    slot: ''
                }
            ],
            detailsData:{}
        }
    },
    onLoad() {
        const eventChannel = this.getOpenerEventChannel();
        eventChannel.on('acceptDataFromSourcePage',  (data) => {
            this.id = data.param.id
            this.getDetails(data.param.id)
        });
        
     },
    methods: {
        async getDetails (id){
            const res = await this.$api.getArticleDetails({id})
            this.detailsData = res
        },
    },
}
</script>

<style scoped lang="scss">
.desc {
    margin-top: 20upx;
    font-size: 24upx;
    color: #666;
    margin-bottom: 20upx;
    display: flex;
    justify-content: space-between;
}
</style>